package com.mysiteforme.admin.mvc.system.contaa.controller;

import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.mysiteforme.admin.annotation.SysLog;
import com.mysiteforme.admin.entity.Contaa;
import com.mysiteforme.admin.mvc.system.contaa.service.ContaaService;
import com.xiaoleilu.hutool.log.Log;
import com.xiaoleilu.hutool.log.LogFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpRequest;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;


/**
 * <p>
 * form表单元数据  前端控制器
 * </p>
 *
 * @author wangl
 * @since 2018-06-10
 */
@Controller
@RequestMapping("admin/system/contaa")
public class ContaaController {
    //推荐创建不可变静态类成员变量
    private static final Log log = LogFactory.get();
    @Autowired
    private ContaaService contaaService;

    @GetMapping("")
    @SysLog("表单管理")
    public String index(Model model) {
        Contaa item = contaaService.selectOne(new EntityWrapper<Contaa>().eq("f001", "123"));
        model.addAttribute("form",item);
        return "admin/system/form/index";
    }
}